<?php
if(!empty($article['Tag']['0'])){
	echo '<ul>';
	foreach($article['Tag'] as $tag){ 
		echo '<li>';
		echo $html->link($tag['name'], array('controller'=>'tags','action'=>'view',$tag['name']));
		if(isset($auth) && $article['User']['id'] == $auth['User']['id']) 
			echo '<input type="button" class="icon LoreleiIconRemove" value="'.$tag['ArticlesTag']['id'].'" />';
		echo '</li>';
	}
	echo '</ul>';
}

/*
if(isset($auth) && $article['User']['id'] == $auth['User']['id']){
	if($this->action != 'tag'){
?><div class="action"><button dojoType="dijit.form.Button" iconclass="LoreleiIcon LoreleiIconAdd"><?php echo __('Add Tag',true); ?></button></div><?php 
	}else{ 
		if(isset($tags_added)) echo '<h4>'.sprintf(__('Your %s has been added.',true),__('Tag',true)).'</h4>';
		if(isset($id) && !isset($tags_added)){
*/
?>
<div id="tag">
	<h4><?php echo __('Add Tags',true);?></h4>
	<?php echo $form->create(null, array('controller'=>'articles','action'=>'tag/'.$article['Article']['id'],'dojoType'=>'dijit.form.Form')); ?>
		<span dojoType="dijit.Tooltip" connectId="ArticleTags"><?php echo __('comma seperated',true);?></span>
		<?php echo $form->text('tags', array('size' => '20','dojoType'=>'dijit.form.TextBox')) ?>
		<button type="submit" dojoType="dijit.form.Button" iconclass="LoreleiIcon LoreleiIconAdd"><?php echo __('Add',true); ?></button>
	<?php echo $form->end(); ?>
</div>
<?php 
/*		}
	}
}
*/
?>
